<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%--
  Created by IntelliJ IDEA.
  User: zyh
  Date: 2021/10/26
  Time: 11:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <link rel="stylesheet" href="${ctx}/css/bootstrap.css">
    <script href="${ctx}/js/bootstrap.js"></script>
  </head>
  <body>
  <table border="1"  class="table table-hover table-striped" >
    <tr>
      <td class="active">员工编号</td>
      <td class="success">员工姓名</td>
      <td class="warning">员工性别</td>
      <td class="danger">员工工资</td>
      <td class="info">员工密码</td>
      <td class="active">员工部门</td>
      <td class="success">员工出生日期</td>
      <td class="warning">操作<a href="${ctx}/inser.jsp">新增</a></td>
    </tr>
    <c:forEach items="${emp.list}" var="e">
      <tr>
        <td class="active">${e.eno}</td>
        <td class="success">${e.ename}</td>
        <td class="warning">${e.esex}</td>
        <td class="danger">${e.salary}</td>
        <td class="info">${e.pwd}</td>
        <td class="active">${e.dno}</td>
        <td class="success">${e.date}</td>
        <td class="warning"><a href="${ctx}/emp?method=updateeno&eno=${e.eno}">修改</a>
        <a href="${ctx}/emp?method=deleteEno&eno=${e.eno}">删除</a>
        </td>
      </tr>
    </c:forEach>
    <tr>
      <td colspan="8" class="text-center">
        <a type="submit" class="btn btn-primary" href="${ctx}/emp?method=selectPage&pageIndex=1">首页</a>
        <a type="submit" class="btn btn-info" href="${ctx}/emp?method=selectPage&pageIndex=${emp.page.pageIndex-1}">上一页</a>
        <a type="button" class="btn btn-success" href="#">${emp.page.pageIndex}/${emp.page.totalPage}</a>
        <a type="button" class="btn btn-info" href="${ctx}/emp?method=selectPage&pageIndex=${emp.page.pageIndex+1}">下一页</a>
        <a type="button" class="btn btn-primary" href="${ctx}/emp?method=selectPage&pageIndex=${emp.page.totalPage}">尾页</a>
      </td>
    </tr>
  </table>
  </body>
</html>
